<?php

namespace App\Models;

use App\ModelFilters\FeedbackFilter;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Feedback extends BaseModel
{
    protected $table = 'tiku_feedback';
    public const CREATED_AT = null;
    public const UPDATED_AT = null;

    protected $fillable = [
        'userId',
        'phone',
        'content',
        'createdAt',
    ];

    public function modelFilter(): ?string
    {
        return $this->provideFilter(FeedbackFilter::class);
    }

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class, 'userId');
    }
}
